/*
	four sided game obstacle
*/
#pragma once

#include <hge.h>
#include <hgesprite.h>
#include <hgevector.h>
#include <hgerect.h>
#include "ball.h"

extern HGE *hge;
extern HTEXTURE obtex;
class Ball;


class Obstacle {
public:
	Obstacle();
	Obstacle(float X, float Y, float W, float H, bool win=false);
	~Obstacle();
	int Collide(Ball *ball);
	float SideX(int which);
	float SideY(int which);
	void Render();
	float x;
	float y;
	float w;
	float h;
	bool winner;	

private:
	void ObstacleInit();
	hgeRect *side[4];
	hgeRect *box;
	hgeSprite *spr;
	//hgeSprite *dSpr[4];//debugging:draw the four sides to figure out the sides of the box
};

